home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / nt-doscl.zip / DSK3-4.EXE / DOS / NETPROG / RASLOAD.BAT < prev    next >
DOS Batch File  |  1993-06-28  |  2KB  |  120 lines

  1. @echo off
  2.  
  3. rem The settings below are edited by the RAS SETUP program.
  4. rem
  5. rem RASR is 1 if there are RAS drivers loaded, 0 otherwise.
  6. rem RASL is 1 if there are non-RAS LM drivers loaded, 0 otherwise.
  7. rem RASB is 1 if running DOS Basic, 0 otherwise.
  8. rem RASC is the computer name under DOS Basic, empty otherwise.
  9.  
  10. set RASR=0
  11.  
  12. if "%RASR%" == "1" goto parseargs
  13. echo.
  14. echo No Remote Access ports configured.
  15. echo Use Remote Access Setup to configure one.
  16. echo.
  17. goto exit
  18.  
  19. :parseargs
  20.  
  21. set RASR=
  22. set RASL=0
  23. set RASB=0
  24. set RASC=
  25.  
  26. if "%1" == ""        goto load
  27. if "%1" == "/u"      goto arg2
  28. if "%1" == "/unload" goto arg2
  29. if "%1" == "/U"      goto arg2
  30. if "%1" == "/UNLOAD" goto arg2
  31. goto error_exit
  32.  
  33. :arg2
  34. if "%2" == ""        goto unload
  35. if "%2" == "/y"      goto unload
  36. if "%2" == "/yes"    goto unload
  37. if "%2" == "/Y"      goto unload
  38. if "%2" == "/YES"    goto unload
  39. goto error_exit
  40.  
  41. :load
  42.  
  43. if "%RASB%" == "1" goto loadbasic
  44. if "%RASL%" == "0" goto startwksta
  45. goto dontstartwksta
  46.  
  47. :startwksta
  48.  
  49. echo Starting WORKSTATION service...
  50. net start workstation
  51. if errorlevel 1 goto exit
  52.  
  53. :dontstartwksta
  54.  
  55. load asybeui
  56. if errorlevel 1 goto loadfailure
  57. goto exit
  58.  
  59. :loadbasic
  60.  
  61. load asybeui
  62. if errorlevel 1 goto loadfailure
  63. echo Starting WORKSTATION service...
  64. net start workstation %RASC%
  65. goto exit
  66.  
  67. :unload
  68.  
  69. if "%RASB%" == "1" goto unloadbasic
  70. rasdial >NUL
  71. unload asybeui
  72. if "%RASL%" == "0" goto stopwksta
  73. goto exit
  74.  
  75. :stopwksta
  76.  
  77. echo Stopping WORKSTATION service...
  78. net stop workstation %2
  79. goto exit
  80.  
  81. :unloadbasic
  82.  
  83. echo.
  84. echo Can't unload when running DOS Basic.
  85. echo.
  86. goto exit
  87.  
  88. :error_exit
  89.  
  90. echo.
  91. echo RASLOAD loads the Remote Access Service DOS TSRs.  These TSRs
  92. echo must be loaded before trying to use the Remote Access software.
  93. echo.
  94. echo Usage: %0 [/unload [/yes]]
  95. echo.
  96. echo /unload   This switch causes RASLOAD to unload the Remote Access
  97. echo           Service DOS TSRs.  Unloading the TSRs frees up more
  98. echo           DOS memory to run your applications.
  99. echo.
  100. echo /yes      This switch answers "YES" to all Lan Manager prompts.
  101. echo.
  102.  
  103. goto exit
  104.  
  105. :loadfailure
  106.  
  107. echo.
  108. echo Failure loading Remote Access TSRs.  Type RASHELP 228 for more
  109. echo information.
  110. echo.
  111.  
  112. :exit
  113.  
  114. set RASR=
  115. set RASL=
  116. set RASB=
  117. set RASC=
  118.  
  119. echo.
  120.